export interface Question {
  id: number
  content: string
  type: 'choice' | 'fill' | 'solve'
  options?: string[]
  correct_answer: string
  knowledge_points: string[]
  difficulty: 1 | 2 | 3 | 4 | 5
  grade: number
}

export interface TestPaper {
  id: number
  title: string
  description?: string
  questions: Question[]
  time_limit?: number
  total_score: number
  created_at: string
}

export interface TestAttempt {
  id: number
  test_paper_id: number
  user_id: number
  answers: Record<number, string>
  score?: number
  start_time: string
  submit_time?: string
  status: 'in_progress' | 'completed'
}

export interface TestResult {
  id: number
  test_attempt: TestAttempt
  test_paper: TestPaper
  score: number
  correct_count: number
  total_count: number
  analysis: {
    knowledge_point_scores: Record<string, number>
    difficulty_distribution: Record<number, number>
    suggestions: string[]
  }
}

export interface TestSelectionCriteria {
  grade?: number
  knowledge_points?: string[]
  difficulty?: number
  question_count?: number
  time_limit?: number
}